home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib / tclx / MathErr.man < prev    next >
Encoding:
Text File  |  1991-11-19  |  5.0 KB  |  220 lines

  1. .\"----------------------------------------------------------------------------
  2. .\" The definitions below are for supplemental macros used in Sprite
  3. .\" manual entries.
  4. .\"
  5. .\" .HS name section [date [version]]
  6. .\"    Replacement for .TH in other man pages.  See below for valid
  7. .\"    section names.
  8. .\"
  9. .\" .AP type name in/out [indent]
  10. .\"    Start paragraph describing an argument to a library procedure.
  11. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  12. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  13. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  14. .\"    needed;  use .AS below instead)
  15. .\"
  16. .\" .AS [type [name]]
  17. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  18. .\"    name are examples of largest possible arguments that will be passed
  19. .\"    to .AP later.  If args are omitted, default tab stops are used.
  20. .\"
  21. .\" .BS
  22. .\"    Start box enclosure.  From here until next .BE, everything will be
  23. .\"    enclosed in one large box.
  24. .\"
  25. .\" .BE
  26. .\"    End of box enclosure.
  27. .\"
  28. .\" .VS
  29. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  30. .\"    of man pages.
  31. .\"
  32. .\" .VE
  33. .\"    End of vertical sidebar.
  34. .\"
  35. .\" .DS
  36. .\"    Begin an indented unfilled display.
  37. .\"
  38. .\" .DE
  39. .\"    End of indented unfilled display.
  40. .\"
  41. '    # Heading for Sprite man pages
  42. .de HS
  43. .if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  44. .if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  45. .if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  46. .if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  47. .if t .wh -1.3i ^B
  48. .nr ^l \\n(.l
  49. .ad b
  50. ..
  51. '    # Start an argument description
  52. .de AP
  53. .ie !"\\$4"" .TP \\$4
  54. .el \{\
  55. .   ie !"\\$2"" .TP \\n()Cu
  56. .   el          .TP 15
  57. .\}
  58. .ie !"\\$3"" \{\
  59. .ta \\n()Au \\n()Bu
  60. \&\\$1    \\fI\\$2\\fP    (\\$3)
  61. .\".b
  62. .\}
  63. .el \{\
  64. .br
  65. .ie !"\\$2"" \{\
  66. \&\\$1    \\fI\\$2\\fP
  67. .\}
  68. .el \{\
  69. \&\\fI\\$1\\fP
  70. .\}
  71. .\}
  72. ..
  73. '    # define tabbing values for .AP
  74. .de AS
  75. .nr )A 10n
  76. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  77. .nr )B \\n()Au+15n
  78. .\"
  79. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  80. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  81. ..
  82. '    # BS - start boxed text
  83. '    # ^y = starting y location
  84. '    # ^b = 1
  85. .de BS
  86. .br
  87. .mk ^y
  88. .nr ^b 1u
  89. .if n .nf
  90. .if n .ti 0
  91. .if n \l'\\n(.lu\(ul'
  92. .if n .fi
  93. ..
  94. '    # BE - end boxed text (draw box now)
  95. .de BE
  96. .nf
  97. .ti 0
  98. .mk ^t
  99. .ie n \l'\\n(^lu\(ul'
  100. .el \{\
  101. .\"    Draw four-sided box normally, but don't draw top of
  102. .\"    box if the box started on an earlier page.
  103. .ie !\\n(^b-1 \{\
  104. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  105. .\}
  106. .el \}\
  107. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  108. .\}
  109. .\}
  110. .fi
  111. .br
  112. .nr ^b 0
  113. ..
  114. '    # VS - start vertical sidebar
  115. '    # ^Y = starting y location
  116. '    # ^v = 1 (for troff;  for nroff this doesn't matter)
  117. .de VS
  118. .mk ^Y
  119. .ie n 'mc \s12\(br\s0
  120. .el .nr ^v 1u
  121. ..
  122. '    # VE - end of vertical sidebar
  123. .de VE
  124. .ie n 'mc
  125. .el \{\
  126. .ev 2
  127. .nf
  128. .ti 0
  129. .mk ^t
  130. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  131. .sp -1
  132. .fi
  133. .ev
  134. .\}
  135. .nr ^v 0
  136. ..
  137. '    # Special macro to handle page bottom:  finish off current
  138. '    # box/sidebar if in box/sidebar mode, then invoked standard
  139. '    # page bottom macro.
  140. .de ^B
  141. .ev 2
  142. 'ti 0
  143. 'nf
  144. .mk ^t
  145. .if \\n(^b \{\
  146. .\"    Draw three-sided box if this is the box's first page,
  147. .\"    draw two sides but no top otherwise.
  148. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  149. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  150. .\}
  151. .if \\n(^v \{\
  152. .nr ^x \\n(^tu+1v-\\n(^Yu
  153. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  154. .\}
  155. .bp
  156. 'fi
  157. .ev
  158. .if \\n(^b \{\
  159. .mk ^y
  160. .nr ^b 2
  161. .\}
  162. .if \\n(^v \{\
  163. .mk ^Y
  164. .\}
  165. ..
  166. '    # DS - begin display
  167. .de DS
  168. .RS
  169. .nf
  170. .sp
  171. ..
  172. '    # DE - end display
  173. .de DE
  174. .fi
  175. .RE
  176. .sp .5
  177. ..
  178. .\"----------------------------------------------------------------------------
  179. .HS Tcl_MathError tcl
  180. .BS
  181. '@index: Tcl_MathError
  182. .SH NAME
  183. Tcl_MathError - Floating point math error trap handler for Tcl.
  184. .SH SYNOPSIS
  185. .nf
  186. \fB#include <tclExtend.h>\fR
  187. .sp
  188. \fBTcl_MathError\fR (\fIfunctionName, errorType\fR)
  189. '
  190. .SH ARGUMENTS
  191. .AS char *functionName
  192. .AP char *functionName in
  193. The name of the function that got the error. From the exception structure
  194. supplied to matherr.
  195. .AP int errorType in
  196. The type of error that occured. From the exception structure supplied to
  197. matherr.
  198. .BE
  199.  
  200. .SH DESCRIPTION
  201. .PP
  202. Tcl math error handler, should be called by an application `matherr' routine
  203. to determine if an error was caused by Tcl code or by other code in the
  204. application.  If the error occured in Tcl code, flags will be set so that a
  205. standard Tcl interpreter error can be returned.
  206. .PP
  207. Returns TRUE if the error was in Tcl code, in which case the matherr routine
  208. calling this function should return non-zero so no error message will be
  209. generated.  FALSE if the error was not in Tcl code, in which case the matherr
  210. routine can handle the error in any manner it choses.
  211. .PP
  212. The Extended Tcl library comes with a \fBmatherr\fR routine that calls
  213. \fBTcl_MathError\fR.  If the error does not belong to Tcl, standard math error
  214. processing is done.  An application may replace this \fRmatherr\fR with their
  215. own version however, it must call \fBTcl_MathError\fR to check if the error
  216. belongs to tcl.
  217.  
  218. .SH KEYWORDS
  219. floating point, math, error
  220.